@extends('layout/default')

@section('content')
<div class="container ">
    <div clas="row ">

        <div class="col-xs-12 ">
            <img class="img-thumbnail" src="{{asset(isset($entry->MTumb)?$entry->MTumb:'images/default.jpg')}}" style="width: 100%;margin: 1em auto">
        </div>

        <div class="col-xs-12" style="margin-top: 1em">
             {{$entry->MTitle}}
        </div>
        <div class="col-xs-12" style="margin-top: 1em" >
            报截止时间：{{$entry->MEnrollEndAt}}
        </div>
        <div class="col-xs-12" style="margin-top: 1em">
             咨询电话：{{$entry->MMobile}}
        </div>
        <div class="col-xs-12" style="margin-top: 1em">
           咨询人：{{$entry->MLinkman}}
        </div>

    </div>
     <form class="col-xs-12" action="{{url('match/join')}}" method="POST" id="match_form" style="margin-top: 2em" >
    <div class="row">
    <div class="col-xs-12">

         <input type="hidden" name="MTMatchID" value="{{$entry->MID}}">
         <input type="hidden" name="_token" value="{{csrf_token()}}">


         <div class="form-group">
           <label for="MTname">队伍名称</label>
           <input type="text" class="form-control" id="MTname" name="MTName" placeholder="队伍名称" required value="{{isset($join->MTName)?$join->MTName:''}}">
         </div>
         <div class="form-group">
             <label for="MTLeaderName">负责人电话</label>
             <input type="text" class="form-control" id="MTLeaderMobile" name="MTLeaderMobile" placeholder="11位手机号" required pattern="^1[3|4|5|8][0-9]\d{4,8}$" placeholder="11位手机号" maxlength="11" value="{{isset($join->MTLeaderMobile)?$join->MTLeaderMobile:''}}">
         </div>
         <div class="form-group">
           <label for="MTLeaderName">负责人姓名</label>
           <input type="text" class="form-control" id="MTLeaderName" name="MTLeaderName" placeholder="姓名" value="{{isset($join->MTLeaderName)?$join->MTLeaderName:''}}" required >
         </div>


    </div>

    </div>
    <div class="row">
        <div class="col-md-12 "style="padding-top: 2em">
            <input class="btn btn-primary col-xs-12" style="height: 3em;margin-top: 3em" id="join" type="submit" value="{{isset($join)?'取消报名':'立即报名'}}" style="width:100%;height: 3em" type="button" >
        </div>
    </div>
    </form>
</div>
@endsection
@section('scripts')
    <script>
    $(function(){
      $('#join').click(function(){
            $(this).attr('disable',true)
        })
    })

    </script>
@endsection
